<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../comunes/header.jsp" />
<h2>Nuevo Flujo</h2>
<form:form method="POST" modelAttribute="flujo">
   <table class="tbl_formulario">
      <tr><th>Clave:</th>
         <td><form:input path="clave" size="3" maxlength="4" />
            <form:errors path="clave" cssClass="ui-corner-all ui-state-error" />
         </td>
      </tr>
      <tr><th>Descripci&oacute;n:</th>
         <td><form:input path="descripcion" size="30" maxlength="100" />
            <form:errors path="descripcion" cssClass="ui-corner-all ui-state-error" />
         </td>
      </tr>
      <tr><th>Decripci&oacute;n Corta:</th>
         <td><form:input path="descripcionCorta" size="15" maxlength="15" />
            <form:errors path="descripcionCorta" cssClass="ui-corner-all ui-state-error" />
         </td>
      </tr>
      <tr><th>Tipo:</th>
         <td><form:select path="tipo">
               <form:option value="RE">Reembolsos</form:option>
               <form:option value="GE">Gen&eacute;rico</form:option>
            </form:select>
            <form:errors path="tipo" cssClass="ui-corner-all ui-state-error" />
         </td>
      </tr>
      <tr><th>Valida el Monto:</th>
         <td><form:radiobutton path="validaMonto" value="S" label="Si" />
            <form:radiobutton path="validaMonto" value="N" label="No" />
            <form:errors path="validaMonto" cssClass="ui-corner-all ui-state-error" />
         </td>
      </tr>
      <tr><th>Comentarios:</th>
         <td><form:textarea path="comentarios" cols="60" rows="3" />
            <form:errors path="comentarios" cssClass="ui-corner-all ui-state-error" />
         </td>
      </tr>
      <tr>
         <td><button type="reset" class="btn_regresar" title="Regresar">Regresar</button></td>
         <td><button type="submit" class="btn_guardar" title="Guardar">Guardar</button></td>
      </tr>
   </table>
</form:form><c:url var="regrUrl" value="/flujos" />
<script type='text/javascript'>
   $(document).ready(function() {
      $(".btn_regresar").click(function() {
         window.location.replace('${regrUrl}');
      });
   });
</script>
<jsp:include page="../comunes/footer.jsp" />